home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Libraries / tcl7.4b3 / Makefile < prev    next >
Encoding:
Makefile  |  1995-04-10  |  11.1 KB  |  342 lines

  1. # Generated automatically from Makefile.in by configure.
  2. #
  3. # This file is a Makefile for Tcl.  If it has the name "Makefile.in"
  4. # then it is a template for a Makefile;  to generate the actual Makefile,
  5. # run "./configure", which is a configuration script generated by the
  6. # "autoconf" program (constructs like "@foo@" will get replaced in the
  7. # actual Makefile.
  8. # @(#) Makefile.in 1.15 95/03/24 09:38:09
  9.  
  10. #----------------------------------------------------------------
  11. # Things you can change to personalize the Makefile for your own
  12. # site (you can make these changes in either Makefile.in or
  13. # Makefile, but changes to Makefile will get lost if you re-run
  14. # the configuration script).
  15. #----------------------------------------------------------------
  16.  
  17. # Default top-level directories in which to install architecture-
  18. # specific files (exec_prefix) and machine-independent files such
  19. # as scripts (prefix).  The values specified here may be overridden
  20. # at configure-time with the --exec-prefix and --prefix options
  21. # to the "configure" script.
  22.  
  23. prefix =    /usr/local
  24. exec_prefix =    ${prefix}
  25.  
  26. # The following definition can be set to non-null for special systems
  27. # like AFS with replication.  It allows the pathnames used for installation
  28. # to be different than those used for actually reference files at
  29. # run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
  30. # when installing files.
  31. INSTALL_ROOT =
  32.  
  33. # Directory from which applications will reference the library of Tcl
  34. # scripts (note: you can set the TCL_LIBRARY environment variable at
  35. # run-time to override this value):
  36. TCL_LIBRARY =    $(prefix)/lib/tcl
  37.  
  38. # Path name to use when installing library scripts:
  39. SCRIPT_INSTALL_DIR =    $(INSTALL_ROOT)$(TCL_LIBRARY)
  40.  
  41. # Directory in which to install the archive libtcl.a:
  42. LIB_INSTALL_DIR =    $(INSTALL_ROOT)$(exec_prefix)/lib
  43.  
  44. # Directory in which to install the program tclsh:
  45. BIN_INSTALL_DIR =    $(INSTALL_ROOT)$(exec_prefix)/bin
  46.  
  47. # Directory in which to install the include file tcl.h:
  48. INCLUDE_INSTALL_DIR =    $(INSTALL_ROOT)$(prefix)/include
  49.  
  50. # Top-level directory in which to install manual entries:
  51. MAN_INSTALL_DIR =    $(INSTALL_ROOT)$(prefix)/man
  52.  
  53. # Directory in which to install manual entry for tclsh:
  54. MAN1_INSTALL_DIR =    $(MAN_INSTALL_DIR)/man1
  55.  
  56. # Directory in which to install manual entries for Tcl's C library
  57. # procedures:
  58. MAN3_INSTALL_DIR =    $(MAN_INSTALL_DIR)/man3
  59.  
  60. # Directory in which to install manual entries for the built-in
  61. # Tcl commands:
  62. MANN_INSTALL_DIR =    $(MAN_INSTALL_DIR)/mann
  63.  
  64. # To change the compiler switches, for example to change from -O
  65. # to -g, change the following line:
  66. #CFLAGS = -O2 -arch hppa -arch sparc -arch i386 -arch m68k
  67. CFLAGS = -O2 
  68.  
  69. # To disable ANSI-C procedure prototypes reverse the comment characters
  70. # on the following lines:
  71. PROTO_FLAGS =
  72. #PROTO_FLAGS = -DNO_PROTOTYPE
  73.  
  74. # Mathematical functions like sin and atan2 are enabled for expressions
  75. # by default.  To disable them, reverse the comment characters on the
  76. # following pairs of lines:
  77. MATH_FLAGS =
  78. #MATH_FLAGS = -DTCL_NO_MATH
  79. MATH_LIBS = 
  80. #MATH_LIBS =
  81.  
  82. # To compile for non-UNIX systems (so that only the non-UNIX-specific
  83. # commands are available), reverse the comment characters on the
  84. # following pairs of lines.  In addition, you'll have to provide your
  85. # own replacement for the "panic" procedure (see panic.c for what
  86. # the current one does).
  87. GENERIC_FLAGS =
  88. #GENERIC_FLAGS = -DTCL_GENERIC_ONLY
  89. UNIX_OBJS = panic.o tclEnv.o tclGlob.o tclMain.o tclMtherr.o \
  90.     tclUnixAZ.o tclUnixStr.o tclUnixUtil.o
  91. #UNIX_OBJS =
  92.  
  93. # To enable memory debugging reverse the comment characters on the following
  94. # lines.  Warning:  if you enable memory debugging, you must do it
  95. # *everywhere*, including all the code that calls Tcl, and you must use
  96. # ckalloc and ckfree everywhere instead of malloc and free.
  97. MEM_DEBUG_FLAGS =
  98. #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
  99.  
  100. # Some versions of make, like SGI's, use the following variable to
  101. # determine which shell to use for executing commands:
  102. SHELL =        /bin/sh
  103.  
  104. # Tcl used to let the configure script choose which program to use
  105. # for installing, but there are just too many different versions of
  106. # "install" around;  better to use the install-sh script that comes
  107. # with the distribution, which is slower but guaranteed to work.
  108.  
  109. INSTALL = install-sh -c
  110.  
  111. #----------------------------------------------------------------
  112. # The information below is modified by the configure script when
  113. # Makefile is generated from Makefile.in.  You shouldn't normally
  114. # modify any of this stuff by hand.
  115. #----------------------------------------------------------------
  116.  
  117. COMPAT_OBJS =         getcwd.o waitpid.o strstr.o
  118. AC_FLAGS =         -DHAVE_UNISTD_H=1 -DNO_DIRENT_H=1 -DSTDC_HEADERS=1 -Dmode_t=int -Dpid_t=int 
  119. INSTALL_PROGRAM =    ${INSTALL}
  120. INSTALL_DATA =        ${INSTALL} -m 644
  121. RANLIB =        ranlib
  122. SRC_DIR =        .
  123.  
  124. #----------------------------------------------------------------
  125. # The information below should be usable as is.  The configure
  126. # script won't modify it and you shouldn't need to modify it
  127. # either.
  128. #----------------------------------------------------------------
  129.  
  130.  
  131. CC =        cc
  132. CC_SWITCHES =    ${CFLAGS} -I. -I${SRC_DIR} ${AC_FLAGS} ${MATH_FLAGS} \
  133. ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
  134. -DTCL_LIBRARY=\"${TCL_LIBRARY}\"
  135.  
  136. GENERIC_OBJS =    regexp.o tclAsync.o tclBasic.o tclCkalloc.o \
  137.     tclCmdAH.o tclCmdIL.o tclCmdMZ.o tclExpr.o tclGet.o \
  138.     tclHash.o tclHistory.o tclLink.o tclParse.o tclProc.o \
  139.     tclUtil.o tclVar.o
  140.  
  141. OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS}
  142.  
  143. SRCS= regexp.c tclAsync.c tclBasic.c tclCkalloc.c \
  144.     tclCmdAH.c tclCmdIL.c tclCmdMZ.c tclExpr.c tclGet.c \
  145.     tclHash.c tclHistory.c tclLink.c tclParse.c tclProc.c \
  146.     tclUtil.c tclVar.c panic.c tclEnv.c tclGlob.c tclMain.c \
  147.     tclMtherr.c tclUnixAZ.c tclUnixStr.c tclUnixUtil.c
  148.  
  149. #all: libtcl.a tclsh
  150. all: libtcl.a
  151.  
  152. libtcl.a: ${OBJS}
  153.     rm -f libtcl.a
  154.     ar cr libtcl.a ${OBJS}
  155.     $(RANLIB) libtcl.a
  156.     mv libtcl.a /LocalDeveloper/Libraries
  157.     cp tcl.h /LocalDeveloper/Headers
  158.  
  159. tclsh: tclAppInit.o libtcl.a
  160.     ${CC} ${CC_SWITCHES} tclAppInit.o libtcl.a ${MATH_LIBS} -o tclsh
  161.  
  162. tcltest: tclTest.o libtcl.a
  163.     ${CC} ${CC_SWITCHES} tclTest.o libtcl.a ${MATH_LIBS} -o tcltest
  164.  
  165. test: tcltest
  166.     @cwd=`pwd`; \
  167.     cd $(SRC_DIR); TCL_LIBRARY=`pwd`/library; export TCL_LIBRARY; \
  168.     cd $$cwd; ( echo cd $(SRC_DIR)/tests\; source all ) | ./tcltest
  169.  
  170. configInfo: Makefile
  171.     @rm -f configInfo
  172.     @echo "# Definitions and libraries needed to build Tcl applications" >> configInfo
  173.     @echo "# (generated by the configure script):" >> configInfo
  174.     @echo "TCL_CC_SWITCHES = ${AC_FLAGS} ${MEM_DEBUG_FLAGS}" >> configInfo
  175.     @echo "TCL_LIBS = ${MATH_LIBS} " >> configInfo
  176.  
  177. install: install-binaries install-libraries install-man
  178.  
  179. install-binaries: libtcl.a tclsh
  180.     @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
  181.         do \
  182.         if [ ! -d $$i ] ; then \
  183.         echo "Making directory $$i"; \
  184.         mkdir $$i; \
  185.         chmod 755 $$i; \
  186.         else true; \
  187.         fi; \
  188.         done;
  189.     @echo "Installing libtcl.a"
  190.     @$(INSTALL_DATA) libtcl.a $(LIB_INSTALL_DIR)
  191.     @$(RANLIB) $(LIB_INSTALL_DIR)/libtcl.a
  192.     @echo "Installing tclsh"
  193.     @$(INSTALL_PROGRAM) tclsh $(BIN_INSTALL_DIR)
  194.  
  195. install-libraries:
  196.     @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
  197.         $(SCRIPT_INSTALL_DIR) ; \
  198.         do \
  199.         if [ ! -d $$i ] ; then \
  200.         echo "Making directory $$i"; \
  201.         mkdir $$i; \
  202.         chmod 755 $$i; \
  203.         else true; \
  204.         fi; \
  205.         done;
  206.     @echo "Installing tcl.h"
  207.     @$(INSTALL_DATA) $(SRC_DIR)/tcl.h $(INCLUDE_INSTALL_DIR)
  208.     @for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex; \
  209.         do \
  210.         echo "Installing $$i"; \
  211.         $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
  212.         done;
  213.  
  214. install-man:
  215.     @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
  216.         do \
  217.         if [ ! -d $$i ] ; then \
  218.         echo "Making directory $$i"; \
  219.         mkdir $$i; \
  220.         chmod 755 $$i; \
  221.         else true; \
  222.         fi; \
  223.         done;
  224.     @cd $(SRC_DIR)/doc; for i in *.1; \
  225.         do \
  226.         echo "Installing doc/$$i"; \
  227.         rm -f $(MAN1_INSTALL_DIR)/$$i; \
  228.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  229.             $$i > $(MAN1_INSTALL_DIR)/$$i; \
  230.         chmod 444 $(MAN1_INSTALL_DIR)/$$i; \
  231.         done;
  232.     @cd $(SRC_DIR)/doc; for i in *.3; \
  233.         do \
  234.         echo "Installing doc/$$i"; \
  235.         rm -f $(MAN3_INSTALL_DIR)/$$i; \
  236.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  237.             $$i > $(MAN3_INSTALL_DIR)/$$i; \
  238.         chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
  239.         done;
  240.     @cd $(SRC_DIR)/doc; for i in *.n; \
  241.         do \
  242.         echo "Installing doc/$$i"; \
  243.         rm -f $(MANN_INSTALL_DIR)/$$i; \
  244.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  245.             $$i > $(MANN_INSTALL_DIR)/$$i; \
  246.         chmod 444 $(MANN_INSTALL_DIR)/$$i; \
  247.         done;
  248.  
  249. Makefile: $(SRC_DIR)/Makefile.in
  250.     $(SHELL) config.status
  251.  
  252. clean:
  253.     rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tclsh tcltest \
  254.         config.info
  255.  
  256. distclean: clean
  257.     rm -f Makefile config.status
  258.  
  259. depend:
  260.     makedepend -- $(CC_SWITCHES) -- $(SRCS)
  261.  
  262. getcwd.o: $(SRC_DIR)/compat/getcwd.c
  263.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/getcwd.c
  264.  
  265. opendir.o: $(SRC_DIR)/compat/opendir.c
  266.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/opendir.c
  267.  
  268. strerror.o: $(SRC_DIR)/compat/strerror.c
  269.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strerror.c
  270.  
  271. strncasecmp.o: $(SRC_DIR)/compat/strncasecmp.c
  272.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strncasecmp.c
  273.  
  274. strstr.o: $(SRC_DIR)/compat/strstr.c
  275.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strstr.c
  276.  
  277. strtod.o: $(SRC_DIR)/compat/strtod.c
  278.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtod.c
  279.  
  280. strtol.o: $(SRC_DIR)/compat/strtol.c
  281.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtol.c
  282.  
  283. strtoul.o: $(SRC_DIR)/compat/strtoul.c
  284.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/strtoul.c
  285.  
  286. tmpnam.o: $(SRC_DIR)/compat/tmpnam.c
  287.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/tmpnam.c
  288.  
  289. waitpid.o: $(SRC_DIR)/compat/waitpid.c
  290.     $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/compat/waitpid.c
  291.  
  292. .c.o:
  293.     $(CC) -c $(CC_SWITCHES) $<
  294.  
  295. #
  296. # Target to check for proper usage of UCHAR macro.
  297. #
  298.  
  299. checkuchar:
  300.     -egrep isalnum\|isalpha\|iscntrl\|isdigit\|islower\|isprint\|ispunct\|isspace\|isupper\|isxdigit $(SRCS) | grep -v UCHAR
  301.  
  302. #
  303. # Target to make sure that only symbols with "Tcl" prefixes are
  304. # exported.
  305. #
  306.  
  307. checkexports: libtcl.a
  308.     -nm -p libtcl.a | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Tt]cl'
  309.  
  310. #
  311. # Target to create a proper Tcl distribution from information in the
  312. # master source directory.  DISTDIR must be defined to indicate where
  313. # to put the distribution.
  314. #
  315.  
  316. configure: configure.in
  317.     autoconf
  318. dist: configure
  319.     rm -rf $(DISTDIR)
  320.     mkdir $(DISTDIR)
  321.     cp Makefile.in $(DISTDIR)
  322.     chmod 664 $(DISTDIR)/Makefile.in
  323.     cp -p $(SRCS) tclTest.c tclAppInit.c $(DISTDIR)
  324.     cp -p tclRegexp.h tcl.h tclInt.h tclPort.h patchlevel.h $(DISTDIR)
  325.     cp configure configure.in $(DISTDIR)
  326.     chmod 775 $(DISTDIR)/configure $(DISTDIR)/configure.in
  327.     cp -p changes README porting.notes porting.old license.terms \
  328.         install-sh $(DISTDIR)
  329.     chmod +x $(DISTDIR)/install-sh
  330.     mkdir $(DISTDIR)/library
  331.     cp -p license.terms library/*.tcl library/tclIndex $(DISTDIR)/library
  332.     mkdir $(DISTDIR)/doc
  333.     cp -p license.terms doc/*.[13n] doc/man.macros $(DISTDIR)/doc
  334.     mkdir $(DISTDIR)/compat
  335.     cp -p license.terms compat/*.c compat/*.h compat/README \
  336.         $(DISTDIR)/compat
  337.     mkdir $(DISTDIR)/tests
  338.     cp -p license.terms $(DISTDIR)/tests
  339.     cp -p tests/*.test tests/README tests/all tests/defs $(DISTDIR)/tests
  340.  
  341. # DO NOT DELETE THIS LINE -- make depend depends on it.
  342.